# Contributor: Alex Laskin <alex@lask.in>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ddcutil
pkgver=2.0.0
pkgrel=0
pkgdesc="Query and change Linux monitor settings using DDC/CI and USB"
url="https://github.com/rockowitz/ddcutil"
arch="all"
license="GPL-2.0-only"
makedepends="
	autoconf
	automake
	eudev-dev
	glib-dev
	i2c-tools-dev
	jansson-dev
	kmod-dev
	libtool
	libusb-dev
	libxrandr-dev
	linux-headers
	"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rockowitz/ddcutil/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e1880cf0e3e724f6ac88f807a867a34f451422b58ce7d23bee7b2fc40b253ef8de13df7706749e0c8242fe5de6db8da91784d16fbf008bb5161732a598c3b9e7  ddcutil-2.0.0.tar.gz
"
